-
-
Notifications
You must be signed in to change notification settings - Fork 196
Closed
Description
Note: I don't know if this caused by Doctrine DBAL, DoctrineBundle, Symfony or Flex, but I can use SQLite with Doctrine + Symfony 3.3, but I can't with Doctrine + Symfony 3.3 + Flex. That's why I open this issue here.
Create a project:
$ composer create symfony/skeleton my-project
$ cd my-project/
$ composer require doctrine
Configure a SQLite database using the same syntax suggested by Flex:
# .env
###> doctrine/doctrine-bundle ###
DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"
###< doctrine/doctrine-bundle ###
Try to create the database:
$ ./bin/console doctrine:database:create
Then you see this error:
Could not create database %kernel.project_dir%/var/data.db for connection named default
An exception occured in driver: SQLSTATE[HY000] [14] unable to open database file
The same error happened to me in other projects using Flex (maybe it's caused by .env + DotEnv?) because I use SQLite databases in functional tests (and they work in Symfony 3.3 without Flex).
emmanuelballery, LefebvreJonathan and yoannk
Metadata
Metadata
Assignees
Labels
No labels